package ltd.dujiabao.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author : DuJiabao
 * @Project : springcloud
 * @Time : 2021/5/21 10:04
 * @Desc :
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class CommonResult<T> implements Serializable {
  private static final long serialVersionUID = 4721048688275245599L;
  public static final Integer SUCCESS = 200;
  public static final Integer FAIlURE = 444;

  private Integer code;
  private String message;
  private T data;

  public CommonResult(Integer code, String message) {
    this.code = code;
    this.message = message;
  }
}
